using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace ArchSoft
{
    public partial class MyPanel : Panel
    {
        public MyPanel()
        {
            InitializeComponent();
        }

        ProjectManager manager_ = null;

        public void OnMouseWheel(object sender, MouseEventArgs e)
        {
            this.OnMouseWheel(e);
        }

        public ProjectManager Manager
        {
            set { manager_ = value; }
            get { return manager_; }
        }

        public void DeleteWindow(T3VForm form)
        {
            this.manager_.DeleteWindow(form);
            this.manager_.SaveProject();
        }

        public void RenameWindow(T3VForm form)
        {
            this.manager_.RenameWindow(form);
        }

        internal void RenameDrawing(T3VForm form, string newName)
        {
            this.manager_.RenameDrawing(form, newName);
        }

        public bool CheckDuplicateFormName(string name, T3VForm form)
        {
            return this.manager_.CheckDuplicateFolderName(name, form);
        }

        public void UpdateAllChildTitle()
        {
            foreach (T3VForm fr in this.Controls)
            {
                fr.UpdateTitle();
            }
        }
        public void UpdateDrawingFiles()
        {
            this.manager_.UpdateDrawingFiles();
        }
    }
}
